/*
 * $Id: robo_fp.h,v 1.24.2.6 Broadcom SDK $
 * 
 * $Copyright: Copyright 2011 Broadcom Corporation.
 * This program is the proprietary software of Broadcom Corporation
 * and/or its licensors, and may only be used, duplicated, modified
 * or distributed pursuant to the terms and conditions of a separate,
 * written license agreement executed between you and Broadcom
 * (an "Authorized License").  Except as set forth in an Authorized
 * License, Broadcom grants no license (express or implied), right
 * to use, or waiver of any kind with respect to the Software, and
 * Broadcom expressly reserves all rights in and to the Software
 * and all intellectual property rights therein.  IF YOU HAVE
 * NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE
 * IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
 * ALL USE OF THE SOFTWARE.  
 *  
 * Except as expressly set forth in the Authorized License,
 *  
 * 1.     This program, including its structure, sequence and organization,
 * constitutes the valuable trade secrets of Broadcom, and you shall use
 * all reasonable efforts to protect the confidentiality thereof,
 * and to use this information only in connection with your use of
 * Broadcom integrated circuit products.
 *  
 * 2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS
 * PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
 * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
 * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY
 * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
 * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
 * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
 * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
 * OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
 * 
 * 3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
 * BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL,
 * INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER
 * ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY
 * TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF
 * THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00,
 * WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING
 * ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.$
 * 
 * DO NOT EDIT THIS FILE!
 * This file is auto-generated.
 * Edits to this file will be lost when it is regenerated.
 */

#ifndef __ROBO_FP_H__
#define __ROBO_FP_H__


/* bcm_field_stat_e */
typedef enum drv_field_stat_e {
    drvFieldStatBytes,                  /* Byte count of traffic of all colors. */
    drvFieldStatPackets,                /* Packet count of traffic of all
                                           colors. */
    drvFieldStatDefault = drvFieldStatPackets, /* Default stat mode. */
    drvFieldStatGreenBytes,             /* Byte count of green traffic. */
    drvFieldStatGreenPackets,           /* Packet count of green traffic. */
    drvFieldStatYellowBytes,            /* Byte count of yellow traffic. */
    drvFieldStatYellowPackets,          /* Packet count of yellow traffic. */
    drvFieldStatRedBytes,               /* Byte count of red traffic. */
    drvFieldStatRedPackets,             /* Packet count of red traffic. */
    drvFieldStatNotGreenBytes,          /* Byte count of not green traffic. */
    drvFieldStatNotGreenPackets,        /* Packet count of not green traffic. */
    drvFieldStatNotYellowBytes,         /* Byte count of not yellow traffic. */
    drvFieldStatNotYellowPackets,       /* Packet count of not yellow traffic. */
    drvFieldStatNotRedBytes,            /* Byte count of not red traffic. */
    drvFieldStatNotRedPackets,          /* Packet count of not red traffic. */
    drvFieldStatCount                   /* Always Last. Not a usable value. */
} drv_field_stat_t;

/* Packet colors. */
#define DRV_FIELD_COLOR_PRESERVE    0          
#define DRV_FIELD_COLOR_GREEN       1          
#define DRV_FIELD_COLOR_YELLOW      2          
#define DRV_FIELD_COLOR_RED         3          

/* User-defined field maximums. */
#define DRV_FIELD_USER_MAX_UDF_NUM  1          /* UDF0 or UDF1. */
#define DRV_FIELD_USER_MAX_USER_NUM 3          /* Valid range: 0..3 */
#define DRV_FIELD_USER_NUM_UDFS     93         
#define DRV_FIELD_USER_FIELD_SIZE   4          /* Bytes per user_num. */
#define DRV_FIELD_USER_MAX_LENGTH   (1 << 5)   /* Number of bits. */

/* Policy options for bcmFieldActionPrioPktNew param1. */
#define DRV_FIELD_SPCP_MARK_MAPPED          0x01       
#define DRV_FIELD_SPCP_MARK_USE_INNER_PCP   0x02       
#define DRV_FIELD_SPCP_MARK_USE_OUTER_PCP   0x04       
#define DRV_FIELD_SPCP_MARK_USE_PORT_DEFAULT 0x08       
#define DRV_FIELD_SPCP_MARK_MASK            0x0f       
#define DRV_FIELD_CPCP_MARK_MAPPED          0x10       
#define DRV_FIELD_CPCP_MARK_USE_INNER_PCP   0x20       
#define DRV_FIELD_CPCP_MARK_USE_OUTER_PCP   0x40       
#define DRV_FIELD_CPCP_MARK_USE_PORT_DEFAULT 0x80       
#define DRV_FIELD_CPCP_MARK_MASK            0xf0       

/* 
 * Policy options for bcmFieldActionInnerVlanNew and
 * bcmFieldActionOuterVlanNew param1.
 */
#define DRV_FIELD_TAG_AS_RECEIVED   0x01       
#define DRV_FIELD_TAG_AS_NORMALIZED 0x02       
#define DRV_FIELD_TAG_COPY          0x04       
#define DRV_FIELD_TAG_REMOVE        0x08       
#define DRV_FIELD_TAG_REPLACE       0x10       

/* 
 * Counter pair modes for bcmFieldActionUpdateCounter
 * 
 * Specifies increment mode for upper (counter_num=1) and lower
 * (counter_num=0) counter in the pair. For example: GREEN_YELLOW would
 * increment the upper counter for green packets and the lower counter
 * for yellow packets.
 * 
 * BCM_FIELD_COUNTER_MODE_BYTES can be ORd with any of the other values
 * to make the counter count bytes instead of packets.
 */
#define DRV_FIELD_COUNTER_MODE_NO_NO        0x0000     
#define DRV_FIELD_COUNTER_MODE_NO_YES       0x0001     
#define DRV_FIELD_COUNTER_MODE_YES_NO       0x0002     
#define DRV_FIELD_COUNTER_MODE_RED_NOTRED   0x0003     
#define DRV_FIELD_COUNTER_MODE_GREEN_NOTGREEN 0x0004     
#define DRV_FIELD_COUNTER_MODE_GREEN_RED    0x0005     
#define DRV_FIELD_COUNTER_MODE_GREEN_YELLOW 0x0006     
#define DRV_FIELD_COUNTER_MODE_RED_YELLOW   0x0007     
#define DRV_FIELD_COUNTER_MODE_BYTES_PACKETS 0x0008     /* Upper counter is
                                                          bytes; lower counter
                                                          is packets */
#define DRV_FIELD_COUNTER_MODE_GREEN        0x0010     
#define DRV_FIELD_COUNTER_MODE_YELLOW       0x0020     
#define DRV_FIELD_COUNTER_MODE_RED          0x0040     
#define DRV_FIELD_COUNTER_MODE_ALL          0x0070     
#define DRV_FIELD_COUNTER_MODE_PACKETS      0x0000     
#define DRV_FIELD_COUNTER_MODE_BYTES        0x0100     
#define DRV_FIELD_COUNTER_MODE_DEFAULT      BCM_FIELD_COUNTER_MODE_NO_YES 

/* Filter types for bcmFieldActionFilters. */
#define DRV_FIELD_FILTER_LAG            0x1        /* LAG Filter overrides the
                                                      rule */
#define DRV_FIELD_FILTER_TAGGED         0x2        /* Tag Framing Filter
                                                      overrides the rule */
#define DRV_FIELD_FILTER_PORT_MASK      0x4        /* Port Mask Filter overrides
                                                      the rule */
#define DRV_FIELD_FILTER_STP            0x8        /* STP Filter overrides the
                                                      rule */
#define DRV_FIELD_FILTER_EAP            0x10       /* EAP Filter overrides the
                                                      rule */
#define DRV_FIELD_FILTER_INGRESS_VLAN   0x20       /* Ingress Vlan Filter
                                                      overrides the rule */
#define DRV_FIELD_FILTER_EGRESS_VLAN    0x40       /* Egress Vlan Filter
                                                      overrides the rule */
#define DRV_FIELD_FILTER_SA             0x80       /* Source address Filter
                                                      overrides the rule */
#define DRV_FIELD_FILTER_ALL            0xff       

/* 
 * Field Qualifiers
 * 
 * Field qualifiers are collected into qualifier sets (qsets), which are
 * used to allocate field groups.
 * 
 * Note: These are in order of their bit width. Do not change the order
 * or the field select code algorithm for wide-mode will get slower.
 */
typedef enum drv_field_qualify_e {
    drvFieldQualifySrcIp6,              /*  Source IPv6 Address. */
    drvFieldQualifyDstIp6,              /*  Destination IPv6 Address. */
    drvFieldQualifySrcIp6High,          /*  Src. IPv6 Address (High/Upper 64
                                           bits). */
    drvFieldQualifyDstIp6High,          /*  Dest IPv6 Address (High/Upper 64
                                           bits). */
    drvFieldQualifySrcIp6Low,           /*  Src. IPv6 Address (Low/Lower 64
                                           bits). */
    drvFieldQualifyDstIp6Low,           /*  Dest IPv6 Address (Low/Lower 64
                                           bits). */
    drvFieldQualifySrcMac,              /*  Source L2 MAC Address. */
    drvFieldQualifyDstMac,              /*  Destination L2 MAC Address. */
    drvFieldQualifySnap,                /*  40: SNAP Header. */
    drvFieldQualifySrcIp,               /*  Source IPv4 Address. */
    drvFieldQualifyDstIp,               /*  Destination IPv4 Address. */
    drvFieldQualifyLlc,                 /*  24: LLC Header. */
    drvFieldQualifyInPort,              /*  Single Input Port. */
    drvFieldQualifyInPorts,             /*  Input Port Bitmap. */
    drvFieldQualifyOutPorts,            /*  Output Port Bitmap. */
    drvFieldQualifyDrop,                /*  Packet is flagged to be dropped . */
    drvFieldQualifyIp6FlowLabel,        /*  IPv6 Flow Label. */
    drvFieldQualifyOuterVlan,           /*  Outer VLAN. */
    drvFieldQualifyOuterVlanId,         /*  Outer VLAN Id. */
    drvFieldQualifyOuterVlanPri,        /*  Outer VLAN priority. */
    drvFieldQualifyOuterVlanCfi,        /*  Outer VLAN Cfi. */
    drvFieldQualifyInnerVlan,           /*  Inner VLAN (double-tagged pkts
                                           only). */
    drvFieldQualifyInnerVlanId,         /*  Inner VLAN Id. */
    drvFieldQualifyInnerVlanPri,        /*  Inner VLAN priority. */
    drvFieldQualifyInnerVlanCfi,        /*  Inner VLAN Cfi. */
    drvFieldQualifyLookupStatus,        /*  DEPRECATED Lookup status
                                           (BCM_FIELD_LOOKUP_xxx). */
    drvFieldQualifyRangeCheck,          /*  TCP/UDP Port Range Check Results. */
    drvFieldQualifyL4SrcPort,           /*  TCP/UDP Source Port. */
    drvFieldQualifyL4DstPort,           /*  TCP/UDP Destination Port. */
    drvFieldQualifyEtherType,           /*  Ethernet Type. */
    drvFieldQualifyIpProtocol,          /*  IP Protocol Field. */
    drvFieldQualifyIp6NextHeader = drvFieldQualifyIpProtocol, /*  IPv6 Next Header/IP Protocol. */
    drvFieldQualifyDSCP,                /*  Diffserv Code Point. */
    drvFieldQualifyTos = drvFieldQualifyDSCP, /*  Tos - same as DSCP. */
    drvFieldQualifyIp6TrafficClass = drvFieldQualifyDSCP, /*  IPv6 Traffic Class. */
    drvFieldQualifyTtl,                 /*  Time To Live/Hop Limit. */
    drvFieldQualifyIp6HopLimit = drvFieldQualifyTtl, /*  IPv6 Hop Limit. */
    drvFieldQualifySrcModid,            /*  Source Module ID (deprecated). */
    drvFieldQualifySrcPortTgid,         /*  Source Port/Trunk Group ID
                                           (deprecated). */
    drvFieldQualifySrcPort,             /*  Source Module ID and Port . */
    drvFieldQualifySrcTrunk,            /*  Source Trunk Group ID . */
    drvFieldQualifyDstModid,            /*  Destination Module ID (deprecated). */
    drvFieldQualifyDstPortTgid,         /*  Dest Port/Trunk Group ID
                                           (deprecated. */
    drvFieldQualifyDstPort,             /*  Destination Module ID and Port . */
    drvFieldQualifyDstTrunk,            /*  Destination Trunk Group ID . */
    drvFieldQualifyTcpControl,          /*  TCP Control Flags. */
    drvFieldQualifyPacketRes,           /*  Pkt resolution
                                           (BCM_FIELD_PKT_RES_xxx). */
    drvFieldQualifyPacketFormat,        /*  DEPRECATED Packet Format
                                           (BCM_FIELD_PKT_FMT_xxx). */
    drvFieldQualifySrcClassL2,          /*  Source Class based on L2 lookup
                                           result. */
    drvFieldQualifySrcMacGroup = drvFieldQualifySrcClassL2, /*  Same as bcmFieldQualifySrcClassL2. */
    drvFieldQualifySrcClassL3,          /*  Source Class based on L3 lookup
                                           result. */
    drvFieldQualifySrcClassField,       /*  Source Class based on
                                           bcmFieldStageLookup result. */
    drvFieldQualifyDstClassL2,          /*  Destination Class based on L2 lookup
                                           result. */
    drvFieldQualifyDstClassL3,          /*  Destination Class based on L3 lookup
                                           result. */
    drvFieldQualifyDstClassField,       /*  Destination Class based on
                                           bcmFieldStageLookup result. */
    drvFieldQualifyLookupClass0 = drvFieldQualifyDstClassField, /*  Same as
                                           bcmFieldQualifyDstClassField. */
    drvFieldQualifyIpInfo,              /*  IP Information (BCM_FIELD_IP_xxx). */
    drvFieldQualifyIpProtocolCommon,    /*  3: Common IP protocols. */
    drvFieldQualifyMHOpcode,            /*  Module Header Opcode. */
    drvFieldQualifyIpFlags,             /*  IPv4 Flags. */
    drvFieldQualifyInnerTpid,           /*  2: Inner VLAN TPID. */
    drvFieldQualifyOuterTpid,           /*  2: Outer VLAN TPID. */
    drvFieldQualifyInnerIpType,         /*  Inner ip header IP Type
                                           (bcmFieldIpTypeXXX). */
    drvFieldQualifyTunnelType,          /*  TunnelType (bcmFieldTunnelXXX). */
    drvFieldQualifyLoopbackType,        /*  LoopbackType
                                           (bcmFieldLoopbackTypeXXX). */
    drvFieldQualifyLoopback,            /*  Packets forwarded through loopback
                                           interface. */
    drvFieldQualifyIpType,              /*  IP Type (bcmFieldIpTypeXXX). */
    drvFieldQualifyForwardingType,      /*  Packet forwarding type
                                           (bcmFieldForwardingTypeXXX). */
    drvFieldQualifyDecap,               /*  Decapsulation occurred. */
    drvFieldQualifyHiGig,               /*  HiGig packet. */
    drvFieldQualifyHiGigProxy,          /*  HiGig proxy processing is enabled. */
    drvFieldQualifyDstHiGig,            /*  Packet being forwarded to higig
                                           port. */
    drvFieldQualifyStage,               /*  Field Processor pipeline stage. */
    drvFieldQualifyStageIngress,        /*  Field Processor pipeline ingress
                                           stage. */
    drvFieldQualifyStageIngressSecurity, /*  Field Processor ingress security
                                           stage. */
    drvFieldQualifyStageIngressQoS,     /*  Field Processor ingress QOS stage. */
    drvFieldQualifyStageLookup,         /*  Field Processor pipeline lookup
                                           stage. */
    drvFieldQualifyStageEgress,         /*  Field Processor pipeline egress
                                           stage. */
    drvFieldQualifyStageEgressSecurity, /*  Field Processor egress security
                                           stage. */
    drvFieldQualifyStageExternal,       /*  Field Processor Rules in External
                                           slice. */
    drvFieldQualifySrcIpEqualDstIp,     /*  Src IP == Dst IP. */
    drvFieldQualifyEqualL4Port,         /*  L4 Src Port == Dst Port. */
    drvFieldQualifyTcpSequenceZero,     /*  Sequence number = 0. */
    drvFieldQualifyTcpHeaderSize,       /*  TCP Header Size. */
    drvFieldQualifyInterfaceClassL2,    /*  Vlan Class Id. */
    drvFieldQualifyInterfaceClassL3,    /*  L3 Interface Class Id. */
    drvFieldQualifyL3IntfGroup = drvFieldQualifyInterfaceClassL3, /*  Same as
                                           bcmFieldQualifyInterfaceClass. */
    drvFieldQualifyInterfaceClassPort,  /*  Port Class Id. */
    drvFieldQualifyPortClass = drvFieldQualifyInterfaceClassPort, /*  Same as
                                           bcmFieldQualifyInterfaceClassPort. */
    drvFieldQualifyL3Routable,          /*  L3 routable bit for FB2. */
    drvFieldQualifyIpFrag,              /*  IP Fragment info. */
    drvFieldQualifyVrf,                 /*  VRF Id for FB 2. */
    drvFieldQualifyL3Ingress,           /*  L3 ingress interface. */
    drvFieldQualifyOutPort,             /*  Single Output Port. */
    drvFieldQualifyIp4,                 /*  Qualify IpType == IPv4Any. */
    drvFieldQualifyIp6,                 /*  Qualify IpType == Ipv6Any. */
    drvFieldQualifyL2Format,            /*  Qualify on L2 header format. */
    drvFieldQualifyVlanFormat,          /*  Qualify on vlan tag format. */
    drvFieldQualifyTranslatedVlanFormat, /*  Qualify on translated vlan tag
                                           format. */
    drvFieldQualifyExtensionHeaderType, /*  Qualify on  Next Header Field in
                                           First Extension Header. */
    drvFieldQualifyExtensionHeaderSubCode, /*  Qualify on First byte after
                                           extentsion header length field. */
    drvFieldQualifyExtensionHeader2Type, /*  Qualify on  Next Header Field in
                                           Second Extension Header. */
    drvFieldQualifyL4Ports,             /*  Four bytes after L3 header are
                                           available. */
    drvFieldQualifyMirrorCopy,          /*  Qualify mirrored traffic. */
    drvFieldQualifyTunnelTerminated,    /*  Qualify tunnel terminated traffic. */
    drvFieldQualifyMplsTerminated,      /*  Qualify mpls terminated traffic. */
    drvFieldQualifyInnerSrcIp,          /*  Inner ip header source IPv6 Address. */
    drvFieldQualifyInnerDstIp,          /*  Inner ip header destination IPv6
                                           Address. */
    drvFieldQualifyInnerSrcIp6,         /*  Inner ip header source IPv6 Address. */
    drvFieldQualifyInnerDstIp6,         /*  Inner ip header destination IPv6
                                           Address. */
    drvFieldQualifyInnerSrcIp6High,     /*  Inner ip header Src. IPv6 Address
                                           (High/Upper 64 bits). */
    drvFieldQualifyInnerDstIp6High,     /*  Inner ip header Dest IPv6 Address
                                           (High/Upper 64 bits). */
    drvFieldQualifyInnerTtl,            /*  Inner ip header time To Live/Hop
                                           Limit. */
    drvFieldQualifyInnerIp6HopLimit = drvFieldQualifyInnerTtl, /*  Inner IPv6 header Hop Limit. */
    drvFieldQualifyInnerTos,            /*  Inner ip header diffserv Code Point. */
    drvFieldQualifyInnerDSCP = drvFieldQualifyInnerTos, /*  Inner DSCP */
    drvFieldQualifyInnerIp6TrafficClass = drvFieldQualifyInnerTos, /*  Inner IPv6 header Traffic Class. */
    drvFieldQualifyInnerIpProtocol,     /*  Inner ip header IP Protocol Field. */
    drvFieldQualifyInnerIp6NextHeader = drvFieldQualifyInnerIpProtocol, /*  Inner Ip6 header  Next Header/IP
                                           Protocol. */
    drvFieldQualifyInnerIpFrag,         /*  Inner ip header IP Fragment info. */
    drvFieldQualifyVlanTranslationHit,  /*  Vlan Translation table hit. */
    drvFieldQualifyForwardingVlanValid, /*  Forwarding vlan is valid. */
    drvFieldQualifyIngressStpState,     /*  Ingress Vlan STG STP state. */
    drvFieldQualifyL2SrcHit,            /*  L2 Source lookup success. */
    drvFieldQualifyL2SrcStatic,         /*  L2 Source is static entry. */
    drvFieldQualifyL2DestHit,           /*  L2 Destination lookup success. */
    drvFieldQualifyL2StationMove,       /*  L2 Source port mismatch. */
    drvFieldQualifyL2CacheHit,          /*  L2 Destination cache lookup sucess. */
    drvFieldQualifyL3SrcHostHit,        /*  L3 Source lookup host table hit. */
    drvFieldQualifyL3DestHostHit,       /*  L3 Destination lookup host table
                                           hit. */
    drvFieldQualifyL3DestRouteHit,      /*  L3 Destination lookup route table
                                           hit. */
    drvFieldQualifyIpmcStarGroupHit,    /*  L3 Multicast lookup (Star,Group)
                                           hit. */
    drvFieldQualifyDosAttack,           /*  Denial of Service attack frame. */
    drvFieldQualifyIpAuth,              /*  IP Authenticated. */
    drvFieldQualifyClassId,             /*  internal use only. */
    drvFieldQualifyBigIcmpCheck,        /*  internal use only. */
    drvFieldQualifyIcmpTypeCode,        /*  internal use only. */
    drvFieldQualifyIgmpTypeMaxRespTime, /*  internal use only. */
    drvFieldQualifyInnerIpProtocolCommon, /*  Inner ip header IP Protocol Common
                                           Field. */
    drvFieldQualifyInnerL4SrcPort,      /*  TCP/UDP Source Port. */
    drvFieldQualifyInnerL4DstPort,      /*  TCP/UDP Destination Port. */
    drvFieldQualifyInnerIp6FlowLabel,   /*  Inner IPv6 header Flow Label. */
    drvFieldQualifyDstL3Egress,         /*  Egress Object id. */
    drvFieldQualifyDstMulticastGroup,   /*  Multicast Group id. */
    drvFieldQualifySrcMplsGport,        /*  Source Mpls gport. */
    drvFieldQualifyDstMplsGport,        /*  Destination Mpls gport. */
    drvFieldQualifySrcMimGport,         /*  Source Mim gport. */
    drvFieldQualifyDstMimGport,         /*  Destination Mim gport. */
    drvFieldQualifySrcWlanGport,        /*  Source Wlan gport. */
    drvFieldQualifyDstWlanGport,        /*  Destination Wlan gport. */
    drvFieldQualifySrcModPortGport,     /*  Source module/port pair. */
    drvFieldQualifySrcModuleGport,      /*  Source module. */
    drvFieldQualifyColor,               /*  Packet color. */
    drvFieldQualifyIntPriority,         /*  Internal priority. */
    drvFieldQualifyForwardingVlanId,    /*  Forwarding vlan id. */
    drvFieldQualifyVpn,                 /*  Vpn id. */
    drvFieldQualifyFlowId,              /*  Flow id. */
    drvFieldQualifyInVPort,             /*  Ingress virtual port id. */
    drvFieldQualifyOutVPort,            /*  Egress virtual port id. */
    drvFieldQualifyFibreChanOuter,      /*  Outer Fibre Channel header type. */
    drvFieldQualifyFibreChanInner,      /*  Inner Fibre Channel header type. */
    drvFieldQualifyVnTag,               /*  NIV VN tag. */
    drvFieldQualifyCnTag,               /*  QCN CN tag. */
    drvFieldQualifyFabricQueueTag,      /*  Fabric queue tag. */
    drvFieldQualifyMyStationHit,        /*  MPLS My Station lookup table hit. */
    drvFieldQualifyDstMultipath,        /*  Destination Multipath ID. */
    drvFieldQualifyL2PayloadFirstEightBytes, /*  First eight bytes of L2 Payload. */
    drvFieldQualifySrcVirtualPortValid, /*  Source Virtual Port is valid. */
    drvFieldQualifyDstL3EgressNextHops, /*  Consecutive L3 Egress Next hops. */
    drvFieldQualifyLlidValue,           /*  LLID value (2 bytes) in preamble. */
    drvFieldQualifyCount                /* Always Last. Not a usable value. */
} drv_field_qualify_t;

#define DRV_FIELD_QUALIFY_MAX   (drvFieldQualifyCount + DRV_FIELD_USER_NUM_UDFS) /* Must be >= bcmFieldQualifyCount. */

/* Field qset defines the set of fields used for lookup. */
typedef struct drv_field_qset_s {
    SHR_BITDCL w[_SHR_BITDCLSIZE(DRV_FIELD_QUALIFY_MAX)]; 
    SHR_BITDCL udf_map[_SHR_BITDCLSIZE(DRV_FIELD_USER_NUM_UDFS)]; 
} drv_field_qset_t;

/* bcm_field_action_e */
typedef enum drv_field_action_e {
    drvFieldActionCosQNew,              /* Change CoS Queue; param0: New CoS
                                           Queue. */
    drvFieldActionCosQCpuNew,           /* Change CoS Queue when CopyToCpu;
                                           param0: New CoS Queue. */
    drvFieldActionVlanCosQNew,          /* Change VLAN CoS Queue; param0: New
                                           CoS Queue. */
    drvFieldActionUcastCosQNew,         /* Change CoS Queue for unicast packets;
                                           param0: New CoS Queue. */
    drvFieldActionMcastCosQNew,         /* Change CoS Queue for multicast
                                           packets; param0: New CoS Queue. */
    drvFieldActionPrioPktAndIntCopy,    /* Pkt & internal priority from inner
                                           tag. */
    drvFieldActionPrioPktAndIntNew,     /* Pkt & internal priority from arg;
                                           param0: New priority. */
    drvFieldActionPrioPktAndIntTos,     /* Pkt & internal priority from TOS
                                           field. */
    drvFieldActionPrioPktAndIntCancel,  /* Override another rule. */
    drvFieldActionPrioPktCopy,          /* Pkt priority from inner tag. */
    drvFieldActionPrioPktNew,           /* Pkt priority from arg; param0: New
                                           priority. */
    drvFieldActionPrioPktTos,           /* Pkt priority from TOS field. */
    drvFieldActionPrioPktCancel,        /* Override another rule. */
    drvFieldActionPrioIntCopy,          /* Internal priority from inner tag. */
    drvFieldActionPrioIntNew,           /* Internal priority from arg; param0:
                                           New priority. */
    drvFieldActionPrioIntTos,           /* Internal priority from TOS field. */
    drvFieldActionPrioIntCancel,        /* Override another rule. */
    drvFieldActionTosNew,               /* Change TOS value in IP header;
                                           param0: New TOS value. */
    drvFieldActionTosCopy,              /* Copy priority from outer tag to IP
                                           hdr. */
    drvFieldActionTosCancel,            /* Override another rule. */
    drvFieldActionDscpNew,              /* Change DSCP value; param0: New DSCP
                                           value. */
    drvFieldActionDscpCancel,           /* Override another rule. */
    drvFieldActionEcnNew,               /* Change ECN value in IP header TOS;
                                           param0: New ECN value. */
    drvFieldActionCopyToCpu,            /* Copy to CPU. */
    drvFieldActionCopyToCpuCancel,      /* Override another rule. */
    drvFieldActionSwitchToCpuCancel,    /* Override switch logic copy-to-CPU. */
    drvFieldActionSwitchToCpuReinstate, /* Reinstate copy-to-CPU switch logic. */
    drvFieldActionTimeStampToCpu,       /* Send a copy to cpu with timestamp and
                                           drop the packet */
    drvFieldActionTimeStampToCpuCancel, /* Override another action (don't
                                           copy,don't drop) */
    drvFieldActionRedirectPort,         /* Redirect Packet to single port;
                                           param0: Destination modid; param1:
                                           Destination port. */
    drvFieldActionRedirect = drvFieldActionRedirectPort, /* Same as bcmFieldActionRedirectPort. */
    drvFieldActionRedirectTrunk,        /* Redirect Packet to a trunk; param0:
                                           Destination trunk ID. */
    drvFieldActionRedirectCancel,       /* Override another rule. */
    drvFieldActionRedirectPbmp,         /* Replace port bitmap; param0:
                                           Destination port bitmap. */
    drvFieldActionRedirectIpmc,         /* Replace L3 multicast L3 & L2 bitmap;
                                           param0: IP Multicast Index. */
    drvFieldActionRedirectMcast,        /* Replace L2 multicast dest bitmap;
                                           param0: L2 Multicast Index. */
    drvFieldActionRedirectVlan,         /* Redirect to VLAN port bitmap. */
    drvFieldActionRedirectBcastPbmp,    /* Replace L2 broadcast dest bitmap;
                                           param0: Destination port bitmap. */
    drvFieldActionEgressMask,           /* Apply egress mask; param0:
                                           Destination port bitmap mask. */
    drvFieldActionEgressPortsAdd,       /* Add additional egress ports; param0:
                                           Destination port bitmap. */
    drvFieldActionDrop,                 /* Drop. */
    drvFieldActionDropCancel,           /* Override another rule. */
    drvFieldActionMirrorOverride,       /* Override any mirroring for packet. */
    drvFieldActionMirrorIngress,        /* Ingress mirror; param0: Dest modid;
                                           param1: Dest port/tgid. */
    drvFieldActionMirrorEgress,         /* Egress mirror; param0: Dest modid;
                                           param1: Dest port/tgid. */
    drvFieldActionL3ChangeVlan,         /* Change VLAN on L3-switched packets;
                                           param0: ECMP or next hop info. */
    drvFieldActionL3ChangeVlanCancel,   /* Override another rule. */
    drvFieldActionL3ChangeMacDa,        /* Change MAC DA on L3-switched packets;
                                           param0: ECMP or next hop info. */
    drvFieldActionL3ChangeMacDaCancel,  /* Override another rule; param0: Next
                                           hop table index. */
    drvFieldActionL3Switch,             /* L3-switch packet; param0: ECMP or
                                           next hop info. */
    drvFieldActionL3SwitchCancel,       /* Override another rule. */
    drvFieldActionAddClassTag,          /* Add Classification Tag. */
    drvFieldActionDropPrecedence,       /* Set Drop Precedence; param0:
                                           BCM_FIELD_COLOR_xxx. */
    drvFieldActionRpDrop,               /* Red Priority Drop. */
    drvFieldActionRpDropCancel,         /* Override another rule. */
    drvFieldActionRpDropPrecedence,     /* Set Red Priority Drop Precedence;
                                           param0: BCM_FIELD_COLOR_xxx. */
    drvFieldActionRpCopyToCpu,          /* Red Priority Copy to CPU. */
    drvFieldActionRpCopyToCpuCancel,    /* Override another rule. */
    drvFieldActionRpSwitchToCpuCancel,  /* Override switch logic copy-to-CPU. */
    drvFieldActionRpSwitchToCpuReinstate, /* Reinstate copy-to-CPU switch logic. */
    drvFieldActionRpTimeStampToCpu,     /* Send a copy to cpu with timestamp and
                                           drop the packet */
    drvFieldActionRpTimeStampToCpuCancel, /* Override another action (don't
                                           copy,don't drop) */
    drvFieldActionRpDscpNew,            /* Red packet change DSCP value; param0:
                                           New DSCP value. */
    drvFieldActionRpDscpCancel,         /* Override any changes to DSCP field. */
    drvFieldActionRpEcnNew,             /* Red packet change ECN value; param0:
                                           New ECN value. */
    drvFieldActionRpOuterVlanPrioNew,   /* Red packet 802.1p priority from arg;
                                           param0: New priority. */
    drvFieldActionRpInnerVlanPrioNew,   /* Red packet 802.1p priority from arg;
                                           param0: New priority. */
    drvFieldActionRpOuterVlanCfiNew,    /* Red packet 802.1p CFI from arg;
                                           param0: New CFI bit value. */
    drvFieldActionRpInnerVlanCfiNew,    /* Red packet 802.1p CFI from arg;
                                           param0: New CFI bit value. */
    drvFieldActionRpPrioPktCopy,        /* Red packet priority from inner tag. */
    drvFieldActionRpPrioPktNew,         /* Red packet priority from argument0;
                                           param0: New priority. */
    drvFieldActionRpPrioPktTos,         /* Red Packet priority from TOS field in
                                           IP header. */
    drvFieldActionRpPrioPktCancel,      /* Override another rule. */
    drvFieldActionRpCosQNew,            /* Red packet change CoS Queue; param0:
                                           New CoS Queue. */
    drvFieldActionRpVlanCosQNew,        /* Red packet change VLAN CoSQ; param0:
                                           New CoS Queue. */
    drvFieldActionRpUcastCosQNew,       /* Red unicast packet change CoS Queue;
                                           param0: New CoS Queue. */
    drvFieldActionRpMcastCosQNew,       /* Red multicast packet change CoS
                                           Queue; param0: New CoS Queue. */
    drvFieldActionRpPrioPktAndIntCopy,  /* Red packet Packet & Internal priority
                                           from inner tag. */
    drvFieldActionRpPrioPktAndIntNew,   /* Red packet Packet & Internal priority
                                           from param0; param0: New priority. */
    drvFieldActionRpPrioPktAndIntTos,   /* Red packet Packet & Internal priority
                                           from TOS field. */
    drvFieldActionRpPrioPktAndIntCancel, /* Override any internal priority
                                           changes. */
    drvFieldActionRpPrioIntCopy,        /* Red packet internal priority from
                                           inner VLAN tag. */
    drvFieldActionRpPrioIntNew,         /* Red packet internal priority from an
                                           argument; param0: New priority. */
    drvFieldActionRpPrioIntTos,         /* Red packet internal priority from IP
                                           header  TOS field. */
    drvFieldActionRpPrioIntCancel,      /* Red packet override any internal
                                           priority changes. */
    drvFieldActionYpDrop,               /* Yellow Priority Drop. */
    drvFieldActionYpDropCancel,         /* Override another rule. */
    drvFieldActionYpDropPrecedence,     /* Set Yellow Priority Drop Precision;
                                           param0: BCM_FIELD_COLOR_xxx. */
    drvFieldActionYpCopyToCpu,          /* Yellow Priority Copy to CPU. */
    drvFieldActionYpCopyToCpuCancel,    /* Override another rule. */
    drvFieldActionYpSwitchToCpuCancel,  /* Override switch logic copy-to-CPU. */
    drvFieldActionYpSwitchToCpuReinstate, /* Reinstate copy-to-CPU switch logic. */
    drvFieldActionYpTimeStampToCpu,     /* Send a copy to cpu with timestamp and
                                           drop the packet */
    drvFieldActionYpTimeStampToCpuCancel, /* Override another action (don't
                                           copy,don't drop) */
    drvFieldActionYpDscpNew,            /* Yellow packet change DSCP value;
                                           param0: New DSCP value. */
    drvFieldActionYpDscpCancel,         /* Override any changes to DSCP field. */
    drvFieldActionYpEcnNew,             /* Yellow packet change ECN value;
                                           param0: New ECN value. */
    drvFieldActionYpOuterVlanPrioNew,   /* Yellow packet 802.1p priority from
                                           arg. */
    drvFieldActionYpInnerVlanPrioNew,   /* Yellow packet 802.1p priority from
                                           arg; param0: New priority. */
    drvFieldActionYpOuterVlanCfiNew,    /* Yellow packet 802.1p CFI from arg;
                                           param0: New CFI bit value. */
    drvFieldActionYpInnerVlanCfiNew,    /* Yellow packet 802.1p CFI from arg;
                                           param0: New CFI bit value. */
    drvFieldActionYpPrioPktCopy,        /* Yellow packet priority from inner
                                           tag. */
    drvFieldActionYpPrioPktNew,         /* Yellow packet priority from param0;
                                           param0: New priority. */
    drvFieldActionYpPrioPktTos,         /* Yellow packet priority from TOS field
                                           in IP header. */
    drvFieldActionYpPrioPktCancel,      /* Override another rule. */
    drvFieldActionYpCosQNew,            /* Yellow packet change CoS Queue;
                                           param0: New CoS Queue. */
    drvFieldActionYpVlanCosQNew,        /* Yellow packet change VLAN CoSQ;
                                           param0: New CoS Queue. */
    drvFieldActionYpUcastCosQNew,       /* Yellow unicast packet change CoS
                                           Queue; param0: New CoS Queue. */
    drvFieldActionYpMcastCosQNew,       /* Yellow multicast packet change CoS
                                           Queue; param0: New CoS Queue. */
    drvFieldActionYpPrioPktAndIntCopy,  /* Yellow packet Packet & Internal
                                           priority from inner tag. */
    drvFieldActionYpPrioPktAndIntNew,   /* Yellow packet Packet & Internal
                                           priority from param0; param0: New
                                           priority. */
    drvFieldActionYpPrioPktAndIntTos,   /* Yellow packet Packet & Internal
                                           priority from TOS field. */
    drvFieldActionYpPrioPktAndIntCancel, /* Override any int priority changes. */
    drvFieldActionYpPrioIntCopy,        /* Yellow packet internal priority from
                                           inner VLAN tag. */
    drvFieldActionYpPrioIntNew,         /* Yellow packet internal priority from
                                           an argument; param0: New priority. */
    drvFieldActionYpPrioIntTos,         /* Yellow packet internal priority from
                                           IP header TOS field. */
    drvFieldActionYpPrioIntCancel,      /* Yellow packet override any internal
                                           priority changes. */
    drvFieldActionUpdateCounter,        /* Update Counter; param0:
                                           BCM_FIELD_COUNTER_MODE_xxx. */
    drvFieldActionMeterConfig,          /* Meter configuration; param0:
                                           BCM_FIELD_METER_MODE_xxx; param1: if
                                           param0 == BCM_FIELD_METER_MODE_FLOW,
                                           this denotes BCM_FIELD_METER_PEAK(1)
                                           or BCM_FIELD_METER_COMMITTED(2). */
    drvFieldActionColorIndependent,     /* Make L3SW_CHANGE_MACDA_OR_VLAN
                                           actions color independent. */
    drvFieldActionClassDestSet,         /* Set destination address lookup class
                                           ID. */
    drvFieldActionClassSet = drvFieldActionClassDestSet, /* Same as bcmFieldActionClassDestSet. */
    drvFieldActionClassSourceSet,       /* Set source address lookup class ID. */
    drvFieldActionVrfSet,               /* Set VRF ID. */
    drvFieldActionInnerVlanNew,         /* Replace inner VLAN ID; param0: New
                                           inner VLAN ID. */
    drvFieldActionInnerVlanPrioNew,     /* Replace inner VLAN tag priority;
                                           param0: New inner VLAN tag priority. */
    drvFieldActionInnerVlanDelete,      /* Delete inner VLAN tag. */
    drvFieldActionOuterVlanDelete,      /* Delete outer VLAN tag. */
    drvFieldActionOuterVlanDeleteCancel, /* Override previous outer VLAN tag
                                           delete. */
    drvFieldActionInnerVlanAdd,         /* Add a new Inner VLAN tag. */
    drvFieldActionInnerVlanCfiNew,      /* Replace packet 802.1p CFI from arg. */
    drvFieldActionOuterVlanNew,         /* Replace outer VLAN ID; param0: New
                                           outer VLAN ID. */
    drvFieldActionVlanNew = drvFieldActionOuterVlanNew, /* Same as bcmFieldActionOuterVlanNew. */
    drvFieldActionOuterVlanAdd,         /* Add a new Outer VLAN tag. */
    drvFieldActionVlanAdd = drvFieldActionOuterVlanAdd, /* Same as bcmFieldActionOuterVlanAdd. */
    drvFieldActionOuterVlanAddCancel,   /* Override previous outer VLAN tag add. */
    drvFieldActionOuterVlanLookup,      /* Lookup outer VLAN tag. */
    drvFieldActionVlanLookup = drvFieldActionOuterVlanLookup, /* Same as
                                           bcmFieldActionOuterVlanLookup. */
    drvFieldActionOuterVlanPrioNew,     /* Replace outer VLAN tag priority;
                                           param0: New outer VLAN tag priority. */
    drvFieldActionOuterVlanCfiNew,      /* Replace packet 802.1p CFI from arg;
                                           param0: New CFI bit value; param0:
                                           New CFI bit value. */
    drvFieldActionOuterTpidNew,         /* Replace TPID in outer VLAN tag;
                                           param0: New tpid. */
    drvFieldActionGpDrop,               /* Green Priority Drop. */
    drvFieldActionGpDropCancel,         /* Override another rule. */
    drvFieldActionGpDropPrecedence,     /* Set Green Priority Drop Precision;
                                           param0: BCM_FIELD_COLOR_xxx. */
    drvFieldActionGpCopyToCpu,          /* Green Priority Copy to CPU. */
    drvFieldActionGpCopyToCpuCancel,    /* Override another rule. */
    drvFieldActionGpSwitchToCpuCancel,  /* Override switch logic copy-to-CPU. */
    drvFieldActionGpSwitchToCpuReinstate, /* Reinstate copy-to-CPU switch logic. */
    drvFieldActionGpTimeStampToCpu,     /* Send a copy to cpu with timestamp and
                                           drop the packet */
    drvFieldActionGpTimeStampToCpuCancel, /* Override another action (don't
                                           copy,don't drop) */
    drvFieldActionGpDscpNew,            /* Green packet change DSCP value;
                                           param0: New DSCP value. */
    drvFieldActionGpDscpCancel,         /* Override any changes to DSCP field. */
    drvFieldActionGpEcnNew,             /* Green packet change ECN value;
                                           param0: New ECN value. */
    drvFieldActionGpTosPrecedenceNew,   /* Green packet change Tos byte
                                           precedence value; param0: New
                                           precedence value. */
    drvFieldActionGpTosPrecedenceCopy,  /* Green packet copy Tos byte precedence
                                           from 802.1p priority. */
    drvFieldActionGpOuterVlanPrioNew,   /* Green packet 802.1p priority from
                                           arg. */
    drvFieldActionGpInnerVlanPrioNew,   /* Green packet 802.1p priority from
                                           arg; param0: New priority. */
    drvFieldActionGpOuterVlanCfiNew,    /* Green packet 802.1p CFI from arg;
                                           param0: New CFI bit value. */
    drvFieldActionGpInnerVlanCfiNew,    /* Green packet 802.1p CFI from arg;
                                           param0: New CFI bit value. */
    drvFieldActionGpPrioPktCopy,        /* Green packet priority from inner tag. */
    drvFieldActionGpPrioPktNew,         /* Green packet priority from param0;
                                           param0: New priority. */
    drvFieldActionGpPrioPktTos,         /* Green packet priority from TOS field
                                           in IP header. */
    drvFieldActionGpPrioPktCancel,      /* Override another rule. */
    drvFieldActionGpCosQNew,            /* Green packet change CoS Queue;
                                           param0: New CoS Queue. */
    drvFieldActionGpVlanCosQNew,        /* Green packet change VLAN CoSQ;
                                           param0: New CoS Queue. */
    drvFieldActionGpUcastCosQNew,       /* Green unicast packet change CoS
                                           Queue; param0: New CoS Queue. */
    drvFieldActionGpMcastCosQNew,       /* Green multicast packet change CoS
                                           Queue; param0: New CoS Queue. */
    drvFieldActionGpPrioPktAndIntCopy,  /* Green packet Packet & Internal
                                           priority from inner tag. */
    drvFieldActionGpPrioPktAndIntNew,   /* Green packet Packet & Internal
                                           priority from param0; param0: New
                                           priority. */
    drvFieldActionGpPrioPktAndIntTos,   /* Green packet Packet & Internal
                                           priority from TOS field. */
    drvFieldActionGpPrioPktAndIntCancel, /* Override any int priority changes. */
    drvFieldActionGpPrioIntCopy,        /* Green packet internal priority from
                                           inner VLAN tag. */
    drvFieldActionGpPrioIntNew,         /* Green packet internal priority from
                                           an argument; param0: New priority. */
    drvFieldActionGpPrioIntTos,         /* Green packet internal priority from
                                           IP header TOS field. */
    drvFieldActionGpPrioIntCancel,      /* Green packet override any internal
                                           priority changes. */
    drvFieldActionDoNotChangeTtl,       /* Do not decrement TTL. */
    drvFieldActionDoNotCheckUrpf,       /* Do not check reverse path for unicast
                                           traffic. */
    drvFieldActionDoNotCheckVlan,       /* Do not check VLAN membership and STG
                                           STP state. */
    drvFieldActionDoNotLearn,           /* Disable L2 learning. */
    drvFieldActionIpFix,                /* Record the packet regardless of port
                                           ipfix enable. */
    drvFieldActionIpFixCancel,          /* Record the packet action override. */
    drvFieldActionIncomingMplsPortSet,  /* Assign incoming MPLS port. */
    drvFieldActionNewTc,                /* Assign new traffic class. */
    drvFieldActionNewClassId,           /* Assign new classfication ID. */
    drvFieldActionLoopback,             /* Forward the packet to the receiving
                                           port. */
    drvFieldActionNewReasonCode,        /* Assign new reasons for packet
                                           forwarded to CPU. */
    drvFieldActionBypassStp,            /* Bypass the STP port state filtering. */
    drvFieldActionBypassEap,            /* Bypass the 802.1x EAP port state
                                           filtering. */
    drvFieldActionBypassVlan,           /* Bypass VLAN checking. */
    drvFieldActionRpRedirectPort,       /* Redirect red packet to single port;
                                           param0: Destination modid; param1:
                                           Destination port. */
    drvFieldActionRpMirrorIngress,      /* Red packet ingress mirror; param0:
                                           Dest modid; param1: Dest port/tgid. */
    drvFieldActionMultipathHash,        /* ECMP Hash selection for
                                           bcmFieldActionL3Switch action. */
    drvFieldActionIpfixRate,            /* Set IPFIX flow rate meter; param0:
                                           rate id */
    drvFieldActionOffloadRedirect,      /* Redirect packet to offload engine. */
    drvFieldActionOffloadClassSet,      /* Set Class Id in offload engine
                                           redirected traffic. */
    drvFieldActionOffloadDropIndication, /* Set drop indicator in offload engine
                                           redirected traffic. */
    drvFieldActionOamUpMep,             /* Indicate UP MEP. */
    drvFieldActionOamTx,                /* Indicate TX direction OAM PDU or data
                                           packet. Used as MSB of
                                           FieldActionOamLmBasePtr'. */
    drvFieldActionOamLmepMdl,           /* MDL value for the LMEP. */
    drvFieldActionOamServicePriMappingPtr, /* Concatenated with the internal
                                           priority as index to LM packet
                                           counter. */
    drvFieldActionOamLmBasePtr,         /* Set base pointer to LM packet
                                           counter. */
    drvFieldActionOamDmEnable,          /* Enable OAM Delay Measurement. */
    drvFieldActionOamLmEnable,          /* Enable OAM Loss Measurement. */
    drvFieldActionOamLmepEnable,        /* Enable OAM loss/delay measurement. */
    drvFieldActionOamPbbteLookupEnable, /* Indicate SVP should be used as the
                                           key for LMEP lookup. */
    drvFieldActionSrcMacNew,            /* Replace source mac of the packet. */
    drvFieldActionDstMacNew,            /* Replace destination mac of the
                                           packet. */
    drvFieldActionVnTagNew,             /* Replace NIV VN tag if present, add if
                                           not present; param0: VN tag. */
    drvFieldActionVnTagDelete,          /* Delete NIV VN tag. */
    drvFieldActionGpRedirectPort,       /* Redirect green packet to single port;
                                           param0: Destination modid; param1:
                                           Destination port. */
    drvFieldActionGpMirrorIngress,      /* Green packet ingress mirror; param0:
                                           Dest modid; param1: Dest port/tgid. */
    drvFieldActionVportNew,             /* Replace/assign virtual port id. */
    drvFieldActionVportSpcpNew,         /* Replace/assign virtual port's spcp. */
    drvFieldActionVportCpcpNew,         /* Replace/assign virtual port's cpcp. */
    drvFieldActionVportTcNew,           /* Replace/assign virtual port's traffic
                                           class. */
    drvFieldActionVportDpNew,           /* Replace/assign virtual port's drop
                                           precedence. */
    drvFieldActionRedirectVportPort,    /* Redirect Packet to single VportPort;
                                           param0: Destination vport; param1:
                                           Destination port. */
    drvFieldActionMacDaKnown,           /* Packet is not treated as a DLF type */
    drvFieldActionFilters,              /* Enable Filters to override the rule;
                                           param0: filter
                                           types(BCM_FIELD_FILTER_XXX) */
    drvFieldActionFabricQueue,          /* Enable ext header on hg ports. */
    drvFieldActionCnmCancel,            /* Do not generate QCN congestion
                                           notification message. */
    drvFieldActionDynamicHgTrunkCancel, /* Disable dynamic HiGig trunking. */
    drvFieldActionDoNotModify,          /* No modifications may be made to the
                                           packet. */
    drvFieldActionOuterVlanCopyInner,   /* Copy the VLAN id from the inner tag
                                           to the outer. */
    drvFieldActionOuterVlanPrioCopyInner, /* Copy the 802.1p priority from the
                                           inner tag to the outer. */
    drvFieldActionOuterVlanCfiCopyInner, /* Copy the CFI bit from the inner tag
                                           to the outer. */
    drvFieldActionInnerVlanCopyOuter,   /* Copy the VLAN id from the outer tag
                                           to the inner. */
    drvFieldActionInnerVlanPrioCopyOuter, /* Copy the 802.1p priority from the
                                           outer tag to the inner. */
    drvFieldActionInnerVlanCfiCopyOuter, /* Copy the CFI bit from the outer tag
                                           to the inner. */
    drvFieldActionCompressSrcIp6,       /* Map incoming IPv6 packet Source IP to
                                           ingress field processor IPv4 Source
                                           IP field. */
    drvFieldActionCompressDstIp6,       /* Map incoming IPv6 packet Destination
                                           IP to ingress field processor IPv4
                                           Destination IP field. */
    drvFieldActionServicePoolIdNew,     /* Change Service Pool ID; param0: New
                                           Service Pool ID. */
    drvFieldActionUseGlobalMeterColor,  /* Use service meters output color
                                           instead of CNG based colour as input
                                           packet color */
    drvFieldActionRedirectEgrNextHop,   /* Redirect packet to next hop; param0:
                                           ECMP or next hop info. */
    drvFieldActionCount                 /* Always Last. Not a usable value. */
} drv_field_action_t;

/* Policer Modes. */
typedef enum drv_policer_mode_e {
    drvPolicerModeSrTcm,            /* RFC 2697 */
    drvPolicerModeCommitted, 
    drvPolicerModePeak, 
    drvPolicerModeTrTcm,            /* RFC 2698 */
    drvPolicerModeTrTcmDs,          /* RFC 4115 */
    drvPolicerModeGreen, 
    drvPolicerModePassThrough, 
    drvPolicerModeSrTcmModified, 
    drvPolicerModeCoupledTrTcmDs, 
    drvPolicerModeCascade, 
    drvPolicerModeCoupledCascade, 
    drvPolicerModeCount 
} drv_policer_mode_t;

#define DRV_POLICER_WITH_ID         0x00000001 
#define DRV_POLICER_REPLACE         0x00000002 
#define DRV_POLICER_COLOR_BLIND     0x00000004 
#define DRV_POLICER_DROP_RED        0x00000008 
#define DRV_POLICER_COLOR_MERGE_OR  0x00000010 

typedef struct drv_policer_config_s {
    uint32 flags;               /* Service VLAN TPID value. */
    drv_policer_mode_t mode;    /* Policer mode. */
    uint32 ckbits_sec;          /* Committed rate. */
    uint32 ckbits_burst;        /* Committed burst size. */
    uint32 pkbits_sec;          /* Peak rate. */
    uint32 pkbits_burst;        /* Peak burst size. */
    uint32 kbits_current;       /* Current size. */
    uint32 action_id;           /* Index of the global meter action entry */
    uint32 sharing_mode;        /* Meter sharing mode in case of Macro meter of
                                   Envelop */
} drv_policer_config_t;

#endif /* __ROBO_FP_H__ */
